{% extends 'index.html' %}
{% load static %}
{% load thumbnail %}

{% block title %}LearningLogs{% endblock %}

{% block posts %}

{% for group in page_obj %}
<article class="post">
	<header>
		<div class="title">
			<h2><a href="{% url 'logs:group' group.id %}">{{ group.title }}</a></h2>
		</div>
		<div class="meta">
			<time class="published" datetime="#">{{ group.date_added|date:"d E Y" }}</time>
			{% thumbnail group.owner.avatar "100x100" crop="center" upscale=True as im %}
				<a href="{% url 'logs:user_logs' group.owner.get_username %}" class="author"><span class="name">{{ group.owner.get_username }}</span><img src="{{ im.url }}" alt="" /></a>
			{% endthumbnail %}
		</div>
	</header>
	{% comment %} <a href="single.html" class="image featured"><img src="{% static 'images/pic01.jpg' %}" alt="" /></a> {% endcomment %}
	<p>
		<!-- {{ group.description|safe|truncatechars_html:50 }} -->
		{{ group.description|safe }}

	</p>
	
	<footer>
		<ul class="actions">
			<li><a href="{% url 'logs:group' group.id %}" class="button large">Читать</a></li>
		</ul>
	</footer>
</article>
{% endfor %}

{% endblock %}